'use strict';

const db = uniCloud.database();
exports.main = async (event, context) => {
	let {keyword} = event;
	let res = await db.collection("users").where({
		userName: new RegExp(keyword, "ig"),
		role: 0
	}).field({"userName": true, "accountNumber": true, "uuid": true, "currentStudyWordBankId": true, "studyNewTimes": true, "reviewTimes": true}).get();
	return res;
};
